<extend name="Index::index"/>
<block name="title"><title>评论管理</title></block>
<block name="table">
	<div class="agoods_nav">
		<span>评论列表</span>
	</div>
	<table class="table" border="1" cellpadding="5" cellspacing="0" >			
			<tr bgcolor="#ccc" height="50">
				<th>编号</th>
				<th>买家</th>
				<th>评论内容</th>
				<th>评论时间</th>
				<th>审核</th>
				<th>卖家回复</th>
			</tr>
			<foreach name="list" item="value">
				<tr>
					<td>{$value['id']}</td>
					<td>{$value['username']}</td>
					<td width="120">{$value['text']}</td>
					<td width="120">{$value['comtime']|date='Y年m月d日',###}</td>
					<td width="100">
					<if condition="$value['status'] eq 1">
					<a href="{:U('Comments/check',['id'=>$value['id'],'p'=>$p])}"><button style="width:80px;height:40px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">显示</button></a>
					<else/>
					<a href="{:U('Comments/check',['id'=>$value['id'],'p'=>$p])}"><button style="width:80px;height:40px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">不显示</button></a>
					</if>
						<!--<button>回复</button>-->
					</td>
					<td>
					<form action="{:U('Comments/reply',['p'=>$p])}" method="post">
						<input type="hidden" name="id" value="{$value['id']}">
						<textarea name="text" style="width:180px;height:60px;margin-top:10px;"></textarea><br/>
						<br/>
						<button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;margin-left:100px;margin-bottom:10px;">提交</button>
					</form>
				</td>
				</tr>
			</foreach>
			<tr>
				<th colspan="6" height="50px">
					{$page}
				</th>
			</tr>
		</table>
</block>